package ${servicePackage};

import ${entityPackage}.${entityName};

/**
* ${tableComment}(table: ${tableName}) 接口
* @author ${author}
* @since ${date}
*/
public interface ${serviceName}{
    /**
     * 插入新数据
     * @author ${author}
     * @since ${date}
     * @param entity:
     * @return com.test.entity.UserEntity
    */
    ${entityName} insert(${entityName} entity);

<#if primaryColumn?? && (primaryColumn?size == 1)>
    /**
     * 根据ID删除记录
     * @author ${author}
     * @since ${date}
     * @param id:
    */
    void deleteById(${primaryColumn[0].javaType} id);

    /**
     * 根据ID更新记录
     * @author ${author}
     * @since ${date}
     * @param param:
    */
    void updateById(${entityName} param);

    /**
     * 根据ID选择性更新
     * @author ${author}
     * @since ${date}
     * @param param:
    */
    void updateSelectiveById(${entityName} param);

    /**
     * 根据ID查询记录
     * @author ${author}
     * @since ${date}
     * @param id:
     * @return ${entityPackage}.${entityName}
    */
    ${entityName} selectById(${primaryColumn[0].javaType} id);

</#if>
}
